﻿<!DOCTYPE html>
<!--动火气体检测-->
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

</head>

<body>
    
<div id="app" v-cloak>   
        <el-form ref="form" :inline="true" label-position="right" label-width="100px" :model="formInline"
            class="demo-form-inline" style="margin-bottom: 15px;">
            <el-row>
                <el-col class="head-tool">
                    
<div class="new_title fl"><strong><img src="/static/images/icon1.png" />动火气体检测列表</strong></div>
                    <span>
                        <btn :text="col.btnAdd" linetype="4" @click="UserAdd('xg')"></btn>
                    </span>
                </el-col>
            </el-row>
        </el-form>

        <el-table ref="table" stripe :data="ListItem.tableData" :row-key="getRowKeys" :height="ListItem.tableHeight"
            border @selection-change="handleSelectionChange" row-style="height:10px" style="width: 100%;">

            <el-table-column type="expand">
                <template slot-scope="props">
                    <el-form label-position="left" inline class="demo-table-expand">
                        <table style=" width:95%; padding-left:30px" cellpadding="0" cellspacing="0">
                            <thead>
                                <tr>
                                    <td style=" text-align:center">{{GasDetectionManagement.DetectionTime}}</td>
                                    <td style=" text-align:center">{{GasDetectionManagement.DetectionPosition}}</td>
                                    <td style=" text-align:center">{{GasDetectionManagement.OxygenConcentration}}</td>
                                    <td style=" text-align:center">
                                        {{GasDetectionManagement.CombustibleGasConcentrationLEL}}</td>
                                    <td style=" text-align:center">{{GasDetectionManagement.ToxicGasConcentration}}</td>
                                    <td style=" text-align:center">{{GasDetectionManagement.TestConclusion}}</td>
                                    <td style=" text-align:center">{{GasDetectionManagement.TesterSignature}}</td>
                                    <td style="text-align:center">操作</td>
                                </tr>
                            </thead>
                            <tbody v-for="todo in props.row.TestingcomentList">
                                <tr>
                                    <td width="100" style="text-align:center">{{todo.DetectionTime}}</td>
                                    <td style=" text-align:center">{{todo.DetectionPosition}}</td>
                                    <td style="text-align:center">{{todo.OxygenConcentration}}</td>
                                    <td style=" text-align:center">{{todo.CombustibleGasConcentrationLEL}}</td>
                                    <td style=" text-align:center">{{todo.ToxicGasConcentration}}</td>
                                    <td style=" text-align:center">{{todo.TestConclusion}}</td>
                                    <td style="  text-align:center">{{todo.TesterSignature}}</td>
                                    <td style=" text-align:center">
                                        <button type="button" class="elst-bt-xg" @click=UserInput('xg',todo.id)>
                                            <i class="el-icon-edit"></i>
                                        </button>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </el-form>
                </template>
            </el-table-column>
            <el-table-column type="selection" style=" padding-top: 0px;  padding-bottom: 0px;  " align="center"
                width="55" :reserve-selection="true">
            </el-table-column>
            <el-table-column type="index" :label="JobLicenseManagement.SerialNumber" :index="indexMethod" width="50"
                show-overflow-tooltip="true"></el-table-column>

            <el-table-column :label="GasDetectionManagement.Number" prop="Number" show-overflow-tooltip="true"
                width="150">
            </el-table-column>
            <el-table-column :label="GasDetectionManagement.TerritorialDepartment" prop="TerritorialDepartment">
            </el-table-column>
            <el-table-column :label="GasDetectionManagement.JobManagere" prop="JobManagere">
            </el-table-column>
            <el-table-column :label="GasDetectionManagement.HotArea" prop="HotArea">
            </el-table-column>
            <el-table-column :label="GasDetectionManagement.HotFirePosition" prop="HotFirePosition"
                show-overflow-tooltip="true" width="150">
            </el-table-column>
            <el-table-column :label="GasDetectionManagement.TestingRequirements" prop="TestingRequirements"
                min-width="150" show-overflow-tooltip="true">
            </el-table-column>
        </el-table>
        <el-row type="flex" justify="end">
            <el-pagination ref="page" @size-change="handleSizeChange" @current-change="handleCurrentChange"
                :current-page="ListItem.currentPage" :page-sizes="ListItem.pagesizes" :page-size="ListItem.pagesize"
                :layout="ListItem.layout" :total="ListItem.total">
            </el-pagination>
        </el-row>
        <el-dialog title="动火气体检测" fullscreen="true" :visible.sync="ListItem.dialogVisible" @close='closeDialog' width="80%" height="80%"
            top="10vh">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:100%;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>
    <script type="text/javascript">

        app = new Vue({
            el: '#app',
            data: function () {
                return {
                    ListItem: ListItem,
                    formInline: {
                        model: {
                            id: '',
                            Number: "",
                            TerritorialDepartment: "",
                            JobManagere: "",
                            HotArea: "",
                            HotFirePosition: "",
                            TestingRequirements: "",
                            DetectionTime: "",
                            DetectionPosition: "",
                            OxygenConcentration: "",
                            CombustibleGasConcentrationLEL: "",
                            ToxicGasConcentration: "",
                            TestConclusion: "",
                            TesterSignature: "",
                            TestingcomentList: []
                        },
                        offset: 0,
                        limit: 10
                    }
                }
            },
            created: function () {
            },
            mounted: function () {

                this.GetPageData(1);
                console.log(111);
                console.log(this);
                //列表高度自适应
                tablehigh(this);
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },

                indexMethod: function (index) {
                    return (this.ListItem.currentPage - 1) * this.ListItem.pagesize + index + 1;
                },

                handleNodeClick: function (data) {
                    console.log(data);
                },
                closeDialog: function () { closeDialog(this); },
                //删除方法
                onDelete: function () { onDelete(this, '/api/GasDetectionManagement/DeleteMuti'); },
                //列表选择触发
                handleSelectionChange: function (val) { handleSelectionChange(this, val); },

                UserAdd: function (val) {
                    var mythis = this;

                    if (mythis.ListItem.tableMultipleSelection.length != 1) {

                        showMessage(msg.OnlyOne, 'error')
                        return;
                    }

                    DialogShow(this, val, "GasDetectionManagementInput.html", mythis.ListItem.tableMultipleSelection[0].id, "type=tj");
                },
                //Dialog展示
                UserInput: function (val, id) { DialogShow(this, val, "GasDetectionManagementInput.html", id); },
                //获取分页数据
                GetPageData: function (currentIndex) { GetPageData(this, currentIndex, '/api/GasDetectionManagement/GetList') },
                //查询方法
                onSubmit: function () { onSubmit(this); },
                //pagesize改变 触发方法
                handleSizeChange: function (val) { handleSizeChange(this, val); },
                //跳页触发方法
                handleCurrentChange: function (val) { handleCurrentChange(this, val); }
            }
        });
    </script>

</body>

</html>